//app.js
App({
	onLaunch: function () {
		/* 设置屏幕常亮 */
		wx.setKeepScreenOn({
			keepScreenOn: true,
		});

		/* 初始化云能力 */
		wx.cloud.init({
			env: "",
			traceUser: true
		});

		// 获取系统状态栏信息
		wx.getSystemInfo({
			success: e => {
				this.globalData.StatusBar = e.statusBarHeight;
				let capsule = wx.getMenuButtonBoundingClientRect();
				if (capsule) {
					this.globalData.Custom = capsule;
					this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
				} else {
					this.globalData.CustomBar = e.statusBarHeight + 50;
				}
			}
		})
	},
	globalData: {
		userInfo: null
	}
})